package com.chiffoyqc.sheet;

import com.chiffoyqc.utils.dataSourceUtil.DataSourceEnum;
import com.chiffoyqc.utils.dataSourceUtil.DataSourceTypeSheet;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/7/12.
 */
public class RetureCodeSheet {
    private final Map<String,String> retureCodeMap = new HashMap<>();

    private static class LazyHolder {
        private static final RetureCodeSheet INSTANCE = new RetureCodeSheet();
    }
    private RetureCodeSheet (){
        retureCodeMap.put("0000","交易成功");
        retureCodeMap.put("1001","表具ID已经存在，不能新增表具");
        retureCodeMap.put("1002","表具编号已经存在，不能新增表具");
        retureCodeMap.put("1003","表具ID不存在");
        retureCodeMap.put("1004","表具编号不存在");
        retureCodeMap.put("1005","表具型号不存在");
        retureCodeMap.put("1006","表具不是在用状态，停用失败");
        retureCodeMap.put("1007","表具不是停用状态，恢复失败");
        retureCodeMap.put("1008","表具不是在用或停用状态，拆除失败");
        retureCodeMap.put("1021","DTU编号已经存在，不能新增DTU");
        retureCodeMap.put("1022","DTU编号不存在");
        retureCodeMap.put("1023","DTU不是在用状态，拆除失败");
        retureCodeMap.put("1024","DTU存在表具，不能拆除");
        retureCodeMap.put("1025","DTU已经存在此表具，不能增加表具");
        retureCodeMap.put("1026","DTU不存在此表具，不能移除表具");
        retureCodeMap.put("1101","安装时间不能为空");
        retureCodeMap.put("1102","启用表读数不能为空");
        retureCodeMap.put("1201","价格 ID 不能为空");
        retureCodeMap.put("1202","价格版本不能为空");
        retureCodeMap.put("1203","价格类型不存在");
        retureCodeMap.put("1204","旧价格类型不存在");
        retureCodeMap.put("1205","阶梯级数不能为空");
        retureCodeMap.put("1206","阶梯价阶梯级数不正确");
        retureCodeMap.put("1207","调价日期不正确");
        retureCodeMap.put("1208","阶梯价周期开始日期不正确");
        retureCodeMap.put("1209","单价不正确");
        retureCodeMap.put("1210","阶梯气量不正确");
        retureCodeMap.put("1211","价格调整时间不正确");
        retureCodeMap.put("1212","阶梯价累用量不正确");
        retureCodeMap.put("1213","任务已存在");
        retureCodeMap.put("1214","阶梯价错误");
        retureCodeMap.put("1215","价格生效日期大于表具开始使用日期");
        retureCodeMap.put("1301","用户号不能为空");
        retureCodeMap.put("1302","客户类型不能为空");
        retureCodeMap.put("1303","机构号不能为空");
        retureCodeMap.put("1401","上次抄表日期为空");
        retureCodeMap.put("1402","本次抄表日期为空");
        retureCodeMap.put("1403","抄表记录 ID 为空");
        retureCodeMap.put("1501","充值交易流水号为空");
        retureCodeMap.put("1502","充值时间不正确");
        retureCodeMap.put("1503","充值金额不正确");
        retureCodeMap.put("1504","取消充值时间不正确");
        retureCodeMap.put("1505","充值或取消充值失败");
        retureCodeMap.put("1601","报警时间不正确");
        retureCodeMap.put("1602","报警类型不正确");
        retureCodeMap.put("9001","鉴权失败");
        retureCodeMap.put("9002","报文格式不正确");
        retureCodeMap.put("9003","数字签名不正确");
        retureCodeMap.put("9004","服务应用编号对应租户编号为空");
        retureCodeMap.put("9005","当前表具不支持此交易");
        retureCodeMap.put("9998","暂停服务");
        retureCodeMap.put("9999","未知错误");
        retureCodeMap.put("1111","参数不能为空");
        retureCodeMap.put("1112","参数格式不正确");
        retureCodeMap.put("1113","获取数据为空");

    }
    public static final RetureCodeSheet getInstance() {
        return RetureCodeSheet.LazyHolder.INSTANCE;
    }

    public Map<String, String> getRetureCodeMap() {
        return retureCodeMap;
    }

    public String getRetureCodeMessage(String code){
        return this.retureCodeMap.get(code);
    }


}
